/* 音程听感训练器样式文件 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding-bottom: 2rem;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.75rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* 标签页样式 */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border-bottom: 2px solid #0d6efd;
    color: #0d6efd;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #0d6efd;
}

/* 统计卡片样式 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 表单控件样式 */
.form-select, .form-control {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-range {
    margin: 0.5rem 0;
}

/* 进度条样式 */
.progress {
    height: 0.75rem;
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 0.5rem;
    transition: width 0.6s ease;
}

/* 音程按钮网格 */
.interval-btn {
    margin: 0.25rem;
    min-height: 3rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.interval-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.interval-btn.correct {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.interval-btn.incorrect {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

/* 音阶选择区域 */
.scales-selection {
    background-color: #f8f9fa;
}

.scales-selection .form-check {
    margin-bottom: 0.5rem;
}

.scales-selection .form-check-label {
    font-weight: 500;
    cursor: pointer;
}

/* 练习区域样式 */
.practice-area {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    text-align: center;
}

.practice-area .btn {
    margin: 0.25rem;
}

.practice-area .question-area h5 {
    color: white;
    margin-bottom: 1.5rem;
}

/* 结果显示区域 */
.result-area {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 1.05rem;
}

.result-correct {
    background-color: rgba(25, 135, 84, 0.1);
    border: 2px solid #198754;
    color: #198754;
}

.result-incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    color: #dc3545;
}

/* 当前音程显示 */
#currentInterval .alert {
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* 计时器样式 */
#practiceTimer {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
}

#practiceTimer h4 {
    margin: 0;
    color: #2d3436;
    font-weight: bold;
}

/* 钢琴键盘样式 */
.piano-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.piano-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #2c3e50;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3);
}

.piano-octave {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.octave-label {
    min-width: 80px;
    font-weight: bold;
    color: #ecf0f1;
    font-size: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.piano-keys {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    flex: 1;
}

.piano-key {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    margin: 1px;
    z-index: 10;
    pointer-events: auto;
}

.piano-key.white {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #2c3e50;
    border: 1px solid #ddd;
}

.piano-key.black {
    background: linear-gradient(145deg, #2c3e50, #1a252f);
    color: #ecf0f1;
    border: 1px solid #34495e;
}

.piano-key:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.piano-key.white:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.piano-key.black:hover {
    background: linear-gradient(145deg, #34495e, #2c3e50);
}

.piano-key:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.piano-key.active {
    animation: keyPress 0.3s ease;
}

@keyframes keyPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.play-demo-btn {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.play-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ff5252, #ffb74d);
}

.piano-controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.piano-controls .form-label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.piano-controls .form-range {
    margin-top: 0.25rem;
}

.piano-controls .form-select {
    margin-top: 0.25rem;
}

.current-note-info .alert {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #2c3e50;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .practice-area {
        padding: 1.5rem 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
    }
    
    .interval-btn {
        min-height: 2.5rem;
        font-size: 0.875rem;
    }
    
    .piano-container {
        padding: 1rem;
    }
    
    .piano-keyboard {
        padding: 1rem;
    }
    
    .piano-key {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    
    .octave-label {
        min-width: 60px;
        font-size: 0.9rem;
    }
    
    .piano-controls {
        padding: 1rem;
    }
    
    .piano-controls .row {
        text-align: center;
    }
    
    .piano-controls .col-md-4 {
        margin-top: 1rem;
    }
    
    .current-note-info .alert {
        font-size: 1rem;
    }
    
    #currentInterval .alert {
        font-size: 1rem;
    }
}